import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class PersonTeat {
    @Test
    public void test01(){
        ApplicationContext context = new ClassPathXmlApplicationContext("application.xml");
        Person person = context.getBean("person",Person.class);
        person.getCat().shout();
        person.getDog().shout();

    }
    @Test
    public void test02(){
        ApplicationContext context = new ClassPathXmlApplicationContext("application.xml");
       Cat cat = context.getBean("cat",Cat.class);

    }
}
